<?php
//$arr = array_fill(5, 6, [1, 2, 3, 4]);

$arr = ['java', 'javascript', 'php', 'php8'];
echo '<pre>';
print_r($arr);

function myf($v) {
    return 'hello:' . $v;
}

//map
$nn = array_map('myf', $arr);
print_r($nn);


function myfilter($v) {
    return str_contains($v, 'php');

}

//
$ss = array_filter($arr, "myfilter");
print_r($ss);